var oleksiivskaLine = new Line("Oleksiivs\'ka");
oleksiivskaLine.addStation(new Station("Oleksiivs\'ka"));
oleksiivskaLine.addStation(new Station("23 Augusta"));
oleksiivskaLine.addStation(new Station("Botanicheskii Sad"));
oleksiivskaLine.addStation(new Station("Naukova"));
var derzhpromStation = new Station("Derzhprom");
oleksiivskaLine.addStation(derzhpromStation);
oleksiivskaLine.addStation(new Station("Arkhitektora Beketova"));
oleksiivskaLine.addStation(new Station("Ploschad Vosstaniya"));
var metrobudivnykivStation = new Station("Metrobudivnykiv im. Vashenka");
oleksiivskaLine.addStation(metrobudivnykivStation);

var holodkaLine = new Line("Holodka");
holodkaLine.addStation(new Station("Holodnaja Gora"));
holodkaLine.addStation(new Station("Yuzhny Vokzal"));
holodkaLine.addStation(new Station("Tsentralny Rynok"));
var sovetskayaStation = new Station("Radyanska");
holodkaLine.addStation(sovetskayaStation);
holodkaLine.addStation(new Station("Prospekt Gagarina"));
var sportyvnaStation = new Station("Sportyvna");
holodkaLine.addStation(sportyvnaStation);
holodkaLine.addStation(new Station("Zavod im. Malysheva"));
holodkaLine.addStation(new Station("Moskovsky Prospekt"));
holodkaLine.addStation(new Station("Marshala Zhukova"));
holodkaLine.addStation(new Station("Sovetskoi Armii"));
holodkaLine.addStation(new Station("im. A.S. Maselskogo"));
holodkaLine.addStation(new Station("Traktorny Zavod"));
holodkaLine.addStation(new Station("Proletarskaya"));

var saltovkaLine = new Line("Saltovskaya");
saltovkaLine.addStation(new Station("Geroev Truda"));
saltovkaLine.addStation(new Station("Studencheskaya"));
saltovkaLine.addStation(new Station("Akademika Pavlova"));
saltovkaLine.addStation(new Station("Kievskaya"));
saltovkaLine.addStation(new Station("Pushkinskaya"));
var universitetStation = new Station("Universitet");
saltovkaLine.addStation(universitetStation);
var muzeiStation = new Station("Istorychny Muzei");
saltovkaLine.addStation(muzeiStation);

var kharkivMetro = new Schema("Kharkiv");
kharkivMetro.addLine(oleksiivskaLine);
kharkivMetro.addLine(holodkaLine);
kharkivMetro.addLine(saltovkaLine);
kharkivMetro.addNode(sportyvnaStation, metrobudivnykivStation);
kharkivMetro.addNode(derzhpromStation, universitetStation);
kharkivMetro.addNode(sovetskayaStation, muzeiStation);

var tracks = kharkivMetro.buildTracks(oleksiivskaLine.getStationByName("23 Augusta"), saltovkaLine.getStationByName("Pushkinskaya"));

function printTracks() {
	for (var i = 0; i < tracks.length; i++) {
		console.log("/n track" + i + "/n");
		if (null != tracks[i]) {
			for (var j = 0; j < tracks[i].getNodesNumber(); j++) {
				var node = tracks[i].getNode(j);
				console.log(" " + j.toString() + node.name);
			}
		}
	}
}